
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt" %>
<html>

<head>
    <meta name="renderer" content="webkit|ie-comp|ie-stand">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta charset='utf-8'>
    <meta name="author" content="order by dede58.com"/>
    <meta http-equiv="Cache-Control" content="no-siteapp" />
    <title>商城</title>
    <meta name="viewport" content="width=device-width,initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <meta http-equiv="Cache-Control" content="no-siteapp">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <meta name="keywords" content="">
    <meta name="description" content="">
    <link rel="stylesheet" type="text/css" href="css/page.css"  />
    <link rel="stylesheet" type="text/css" href="css/base.css"  />
    <script src="js/jquery-3.6.0.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="js/jquery.SuperSlide.2.1.js"></script>
    <link rel="icon" href="img/logo1.jpg" >
    <script>
        var ty="";
        var size="";
        var price="";
        $(function () {
          show(1);
            $("#myuu").children("li").click(function () {
                    var msg=$(this).html();
                    if(msg!="不限"){
                        ty=$(this).children("a").html();

                    }else{
                        ty="";
                    }
                show(1);
            });
            $(".myul").children("li").click(function () {
                var msg=$(this).html();
                if(msg!="不限"){
                    size=$(this).children("a").html();

                }else {
                    size="";
                }
                show(1)
            });
            $(".myPriceUl").children("li").click(function () {
                var msg=$(this).html();
                if(msg!="不限"){
                    price=$(this).children("a").html();

                }else {
                    price="";
                }
                show(1)
            });
        });


        // $("#myuu").on("click",".li",function () {
        //     var msg=$(this).html();
        //     if(msg!="不限"){
        //         ty=$(this).children("a").html();
        //         alert(ty)
        //     }
        // });

        //初始化方法
        function show(page) {
            $.ajax({
                url:"goods",
                type:"post",
                data:{"method":"mallInit","page":page,"type":ty,"size":size,"price":price},
                dataType:"json",
                success:function (data) {
                    $('#fuck').empty();
                    $('#fuckbt').empty();
                    $.each(data.list,function (index,k) {
                        $(" <div class=\"list clearfix transition\">\n" +
                            "                    <div class=\"tu clearfix\">\n" +
                            "                        <img src=\"${pageContext.request.contextPath}/"+k.GoodsPic+"\"/>\n" +
                            "                        <span></span>\n" +
                            "                        <div class=\"ycang clearfix\">\n" +
                            "                            <samp class=\"opa8\"></samp>\n" +
                            "                            <div class=\"nr clearfix\">       \n" +
                            "                                <ul>\n" +
                            "                                    <li class=\"box-s transition\">收藏</li>\n" +
                            "                                    <li class=\"box-s transition\" id='xblm'><input type=\"hidden\" value=\""+k.GoodsId+"\" id=\"mallId\"/>购物车</li>\n" +
                            "                                </ul>\n" +
                            "                            </div>\n" +
                            "                        </div>\n" +
                            "                    </div>\n" +
                            "                    <div class=\"xia clearfix box-s\">\n" +
                            "                        <p class=\"bt over\">\n" +
                            "                            "+k.GoodsName+"\n" +
                            "                        </p>\n" +
                            "                        <div class=\"price clearfix\">\n" +
                            "                            <span class=\"fl\">￥"+k.GoodsNewPrice+"<samp>原价￥"+(k.GoodsNewPrice+1000)+"</samp></span>\n" +
                            "                            <a href=\"goods?method=buyGoods&goodsId="+k.GoodsId+"\"  class=\"goumai fr ra3 transition\">立即购买</a>\n" +
                            "                        </div>\n" +
                            "                    </div>\n" +
                            "                </div>").appendTo('#fuck');
                    });

                    $('#fuck').on('click','#xblm',function () {
                            var ss = $(this).children('#mallId').val();
                            $.post("goods",{"method":"mallAddCart","goodsId":ss},function (data) {
                                var back=data;
                                if(back=='yes'){
                                    alert("添加购物车成功！");
                                }else if(back=="没登陆"){
                                    alert("没登陆");
                                }else {
                                    alert("购物车已有该商品");
                                }

                            })

                    })

                    $("<a class=\"pre box-s\" id='sy'>首页</a>").appendTo('#fuckbt');
                    for(var i=1;i<=data.maxpage;i++){
                        var index=i;
                        $("<a class='cent'>"+i+"页</a>").appendTo('#fuckbt');

                    }
                    $("#fuckbt").on('click','.cent',function () {
                        var substr = $(this).html().substr(0,1);
                        show(substr);
                    });
                    // -------------------------------------------------
                    $("<a class=\"pre box-s sb\" id='wy'>尾页</a>").appendTo('#fuckbt');

                    //稍后完成
                    $("#fuckbt").on('click','#sy',function () {
                        show(1);
                    });
                    $("#fuckbt").on('click','#wy',function () {
                        show(data.maxpage);
                    });

                }
            });
        }




    </script>
</head>

<body>
<!--header star-->
<div class="header clearfix">
    <div class="top clearfix">
        <div class="topctent clearfix">
            <div class="left clearfix fl">
                <c:if test="${sessionScope.userName==null}">

                </c:if>
                <c:if test="${sessionScope.userName!=null}">
                    公告：您好，尊敬的<span style="color: black;font-weight:bold ">&nbsp;${sessionScope.userName}&nbsp;</span>欢迎登录千硕拍卖场
                </c:if>
            </div>
            <div class="right clearfix fr">
                <c:if test="${sessionScope.userName==null}">
                    <div class="zuo clearfix fl">
                        <ul class="clearfix fl">
                            <li>
                                <span class="fl">您好，请</span>
                                <a href="sign.jsp" class="fl">&nbsp;登录</a>
                            </li>
                            <li>
                                <a href="register.jsp" >
                                    免费注册
                                </a>
                            </li>
                        </ul>
                    </div>
                </c:if>
                <c:if test="${sessionScope.userName!=null}">
                    <ul class="clearfix fl" style="display: inline-block;;margin-top: 15px">
                        <li>
                            <a href="grxx.jsp" class="fl" style="text-align: center;line-height: 100%">${sessionScope.userName}&nbsp;</a>
                            <a href="logout.jsp" class="fl" style="text-align: center;line-height: 100%;color: red">退出登录</a>
                            &nbsp;<span style="width: 20px">-----</span>&nbsp;
                        </li>
                    </ul>
                </c:if>

                <div class="shopcar-btn clearfix fl">
                    <a href="shopping.jsp"  class="box-s">
                        购物车（0）
                    </a>
                </div>
                <div class="fenxiang clearfix fl">
                    <span class="fl">分享到：</span>
                    <ul class="clearfix fl">
                        <li><a href="#"><img src="img/sina.png" /></a></li>
                        <li><a href="#"><img src="img/qq.png" /></a></li>
                        <li><a href="#"><img src="img/wechat.png" /></a></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
    <div class="bottom clearfix">
        <div class="logo clearfix">
            <img src="${pageContext.request.contextPath}/img/logo1.jpg" style="position: absolute;bottom: 0px;height: 100%">
        </div>
        <div class="search clearfix fr ra5">
            <input type="text" class="fl" name="" id="" value="" placeholder="请输入您要搜索的内容" />
            <input type="button" name="" id="" value="搜索" class="fl box-s" />
        </div>
    </div>
</div>
<!--header end-->

<!--navbar star-->
<div class="navbar clearfix">
    <div class="content clearfix">
        <ul>
            <li><a href="init?method=mainInit" >首页</a></li>
            <li><a href="special.jsp" >专场</a></li>
            <li class="cur"><a href="mall.jsp">商城</a></li>
            <li class="cur"><a href="artist.jsp" >艺术家</a></li>
        </ul>
    </div>
</div>
<!--navbar end-->

<!--mall star-->
<div class="mall clearfix">
    <!--sorts star-->
    <div class="sorts clearfix">
        <div class="content clearfix">
            <div class="top clearfix box-s">
                您的位置：商城
            </div>
            <div class="listed clearfix box-s">
                <div class="list clearfix fl">
                    <p class="bt fl">
                        分类：
                    </p>
                    <div class="right clearfix fl">
                        <ul id="myuu">
                            <li class="cur">不限</li>
                            <li class="li" id="kind_Filtered1"><a href="#">书画</a></li>
                            <li class="li" id="kind_Filtered2"><a href="#">油画</a></li>
                            <li class="li" id="kind_Filtered3"><a href="#">版画</a></li>
                            <li class="li" id="kind_Filtered4"><a href="#">雕塑</a></li>
                        </ul>
                    </div>
                </div>
                <div class="list clearfix fl">
                    <p class="bt fl">
                        尺寸：
                    </p>
                    <div class="right clearfix fl">
                        <ul class="myul">
                            <li class="cur">不限</li>
                            <li id="size_Filtered1"><a href="#" class="mya">小于50cm</a></li>
                            <li id="size_Filtered2"><a href="#" class="mya">50-100cm</a></li>
                            <li id="size_Filtered3"><a href="#" class="mya">大于150cm</a></li>
                        </ul>
                    </div>
                </div>
                <div class="list clearfix fl">
                    <p class="bt fl">
                        价格：
                    </p>
                    <div class="right clearfix fl">
                        <ul class="myPriceUl">
                            <li class="cur">不限</li>
                            <li id="Price_Filtered1"><a href="#">0-10000元</a></li>
                            <li id="Price_Filtered2"><a href="#">10000-20000元</a></li>
                            <li id="Price_Filtered3"><a href="#">20000-300000元</a></li>
                            <li id="Price_Filtered4"><a href="#">30000-50000元</a></li>
                            <li id="Price_Filtered5"><a href="#">50000元以上</a></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!--sorts end-->

    <!--sales star-->
    <div class="sales clearfix" >
        <div class="content clearfix">
            <div class="top clearfix">
                <div class="left clearfix fl">
                    <!--以下li中添加cur的时候是选中的时候-->
                    <ul>
                        <li>综合排序</li>
                        <li class="xliang cur">销量</li>
                        <li class="xpin">新品</li>
                    </ul>
                </div>
            </div>
            <div class="bottom clearfix" style="position: relative">
                    <div id="fuck">

                    </div>

                <%--    --------------------国志分页------------------------------%>
                <div class="page clearfix ta-right" style="position: absolute;bottom: -10px;right: 30%" id="fuckbt">
                    <%--                        <a href="goods?method=mallInit&page=${requestScope.page-1}" class="pre box-s">上一页</a>--%>
                    <%--                        <c:forEach begin="1" end="${requestScope.MaxPage}" var="p">--%>
                    <%--                            <a href="goods?method=mallInit&page=${p}">${p}</a>--%>
                    <%--                        </c:forEach>--%>
                    <%--                        <a href="goods?method=mallInit&page=${requestScope.page+1}" class="next box-s">下一页</a>--%>
                </div>
            </div>
        </div>
        <!--sales end-->
    </div>
    <!--mall end-->

    <!--footer star-->
    <div class="footer clearfix">
        <div class="content clearfix">
            <div class="top clearfix">
                <div class="list clearfix fl box-s">
                    <div class="part icon1 box-s">
                        <h3>专业</h3>
                        <p>拥有资深艺术顾问和先进交易平台，安全物流，快捷支付。</p>
                    </div>
                </div>
                <div class="list clearfix fl box-s">
                    <div class="part icon2 box-s">
                        <h3>保真</h3>
                        <p>阵容强大的艺术评鉴团，确保平台上的藏品货真价实。</p>
                    </div>
                </div>
                <div class="list clearfix fl box-s">
                    <div class="part icon3 box-s">
                        <h3>保值</h3>
                        <p>为您精选具备艺术价值的作品，助您的资产保值、增值。</p>
                    </div>
                </div>
            </div>
            <div class="bottom clearfix">
                <div class="left clearfix fl">
                    <div class="list clearfix">
                        <div class="shang clearfix">
                            <p>新手指南</p>
                            <span></span>
                        </div>
                        <div class="xia clearfix">
                            <ul>
                                <li><a href="scgmlc.html" >商城购买流程</a></li>
                                <li><a href="cjwt.html" >常见问题</a></li>
                            </ul>
                        </div>
                    </div>
                    <div class="list clearfix">
                        <div class="shang clearfix">
                            <p>账户管理</p>
                            <span></span>
                        </div>
                        <div class="xia clearfix">
                            <ul>
                                <li><a href="zhcz.html" >账户充值</a></li>
                                <li><a href="zhtx.html" >账户提现</a></li>
                                <li><a href="zffs.html" >支付方式</a></li>
                            </ul>
                        </div>
                    </div>
                    <div class="list clearfix">
                        <div class="shang clearfix">
                            <p>服务合作</p>
                            <span></span>
                        </div>
                        <div class="xia clearfix">
                            <ul>
                                <li><a href="friend-link.html" >友情链接</a></li>
                            </ul>
                        </div>
                    </div>
                    <div class="list clearfix">
                        <div class="shang clearfix">
                            <p>关于我们</p>
                            <span></span>
                        </div>
                        <div class="xia clearfix">
                            <ul>
                                <li><a href="gsjj.html" >公司简介</a></li>
                                <li><a href="contact.html" >联系我们</a></li>
                                <li><a href="jrwm.html" >加入我们</a></li>
                            </ul>
                        </div>
                    </div>
                    <div class="list clearfix">
                        <div class="shang clearfix">
                            <p>售后服务</p>
                            <span></span>
                        </div>
                        <div class="xia clearfix">
                            <ul>
                                <li><a href="wlsm.html" >物流说明</a></li>
                                <li><a href="mzsm.html" >免责声明</a></li>
                            </ul>
                        </div>
                    </div>
                </div>
                <div class="middle clearfix fl">
                    <ul>
                        <li><img src="img/ewm.jpg" /></li>
                        <li><img src="img/ewm.jpg" /></li>
                    </ul>
                </div>
                <div class="right clearfix fr">
                    <p class="bt">免费咨询热线：</p>
                    <p class="tel">400-000-0000</p>
                    <p class="fu-bt">(周一到周五8:00-22:00)</p>
                </div>
            </div>
        </div>
        <div class="banquan clearfix ta-center">
            Copyright © 2020 檀卡文化(tankawenhua). All Rights Reserved.
        </div>
    </div>
    <!--footer end-->
</body>
<script type="text/javascript">
    $('.listed .list ul li').each(function() {
        $(this).click(function() {
            $(this).siblings("li").removeClass("cur");
            $(this).addClass("cur");
        });
    });
</script>
<%--<script src="js/other.js"  type="text/javascript" ></script>--%>
</html>